using System.Collections.Generic;
/// <summary>
/// SpriteAtlas枚举模版
/// </summary>
public enum enESF_SpriteAtlas
{
	ASSETS_GAME_GAMEHFRESOURCE_SPRITEATLAS_COMMONPOPUP,
	ASSETS_GAME_GAMEHFRESOURCE_SPRITEATLAS_UIBAG,
	ASSETS_GAME_GAMEHFRESOURCE_SPRITEATLAS_UIBATTLE,
}
/// <summary>
/// 全局SpriteAtlas
/// </summary>
public sealed partial class ESF_Global_SpriteAtlas : AbsESF_SingleRunTime<ESF_Global_SpriteAtlas>
{
	/// <summary>
	/// 图集映射
	/// </summary>
	readonly static Dictionary<enESF_LanguageClassify,
	Dictionary<enESF_SpriteAtlas, Dictionary<enESF_LanguageRootFolder,int>>> mSpriteAtlasAttrHashCodeMaping =
	new Dictionary<enESF_LanguageClassify, Dictionary<enESF_SpriteAtlas, Dictionary<enESF_LanguageRootFolder,int>>>()
	{	
	{
	enESF_LanguageClassify.CN,
	new Dictionary<enESF_SpriteAtlas, Dictionary<enESF_LanguageRootFolder,int>>()
	{
	{
	enESF_SpriteAtlas.ASSETS_GAME_GAMEHFRESOURCE_SPRITEATLAS_COMMONPOPUP,
	new Dictionary<enESF_LanguageRootFolder,int>(){
	{enESF_LanguageRootFolder.ASSETS_GAME_GAMEHFRESOURCE,205678913}, //"ASSETS_GAME_GAMEHFRESOURCE_SPRITEATLAS_COMMONPOPUP_CN" ESF_UniqueHashCode 205678913
	}
	},
	{
	enESF_SpriteAtlas.ASSETS_GAME_GAMEHFRESOURCE_SPRITEATLAS_UIBAG,
	new Dictionary<enESF_LanguageRootFolder,int>(){
	{enESF_LanguageRootFolder.ASSETS_GAME_GAMEHFRESOURCE,415450775}, //"ASSETS_GAME_GAMEHFRESOURCE_SPRITEATLAS_UIBAG_CN" ESF_UniqueHashCode 415450775
	}
	},
	{
	enESF_SpriteAtlas.ASSETS_GAME_GAMEHFRESOURCE_SPRITEATLAS_UIBATTLE,
	new Dictionary<enESF_LanguageRootFolder,int>(){
	{enESF_LanguageRootFolder.ASSETS_GAME_GAMEHFRESOURCE,1129231628}, //"ASSETS_GAME_GAMEHFRESOURCE_SPRITEATLAS_UIBATTLE_CN" ESF_UniqueHashCode 1129231628
	}
	},
	}
	},
	};
	/// <summary>
	/// ESF_SpriteAtlas_AssetBundleAttribute属性映射
	/// </summary>
	static readonly Dictionary<int, ESF_SpriteAtlas_AssetBundleAttribute> mESF_SpriteAtlas_AssetBundleAttributeMaping = new Dictionary<int, ESF_SpriteAtlas_AssetBundleAttribute>() {
	{205678913,new ESF_SpriteAtlas_AssetBundleAttribute(enESF_LanguageRootFolder.ASSETS_GAME_GAMEHFRESOURCE,"SpriteAtlasAssets/commonPopup/ASSETS_GAME_GAMEHFRESOURCE_SPRITEATLAS_COMMONPOPUP_{0}.spriteatlas")},	
	{415450775,new ESF_SpriteAtlas_AssetBundleAttribute(enESF_LanguageRootFolder.ASSETS_GAME_GAMEHFRESOURCE,"SpriteAtlasAssets/UIBag/ASSETS_GAME_GAMEHFRESOURCE_SPRITEATLAS_UIBAG_{0}.spriteatlas")},	
	{1129231628,new ESF_SpriteAtlas_AssetBundleAttribute(enESF_LanguageRootFolder.ASSETS_GAME_GAMEHFRESOURCE,"SpriteAtlasAssets/UIBattle/ASSETS_GAME_GAMEHFRESOURCE_SPRITEATLAS_UIBATTLE_{0}.spriteatlas")},	
	};
	/// <summary>
	/// 获得图集属性
	/// </summary>
	/// <param name="_spriteAtlas">图集</param>
	/// <param name="_rootFolder">资源根路径</param>
	/// <returns>图集属性</returns>
	public ESF_SpriteAtlas_AssetBundleAttribute GetSpriteAtlasPath(enESF_SpriteAtlas _spriteAtlas, enESF_LanguageRootFolder _rootFolder)
	{
	ESF_SpriteAtlas_AssetBundleAttribute result = null;
	Dictionary<enESF_SpriteAtlas, Dictionary<enESF_LanguageRootFolder, int>> spa = null;
	Dictionary<enESF_LanguageRootFolder, int> folder = null;
	int key = 0;
	if (mSpriteAtlasAttrHashCodeMaping.TryGetValue(ESF_LanguageHelper.language, out spa))
	{//查询当前语言包数据
	if (spa.TryGetValue(_spriteAtlas, out folder))
	{
	if (folder.TryGetValue(_rootFolder, out key))
	{
	if (mESF_SpriteAtlas_AssetBundleAttributeMaping.TryGetValue(key, out result))
	{ 
	}
	}
	}
	}
	if (result == null)
	{//查询默认语言包数据
	if (mSpriteAtlasAttrHashCodeMaping.TryGetValue(ESF_LanguageHelper.defaultAlternateLanguage, out spa))
	{
	if (spa.TryGetValue(_spriteAtlas, out folder))
	{
	if (folder.TryGetValue(_rootFolder, out key))
	{
	if (mESF_SpriteAtlas_AssetBundleAttributeMaping.TryGetValue(key, out result))
	{
	}
	}
	}
	}
	}
	return result;
	}
	/// <summary>
	/// 获得图集属性	
	/// </summary>
	/// <param name="_spriteAtlasName">参考SpriteAtlasManager.atlasRequested</param>
	/// <returns>图集属性</returns>
	public ESF_SpriteAtlas_AssetBundleAttribute GetSpriteAtlasPath(string _spriteAtlasName)
	{
	int key = _spriteAtlasName.ToUpper().ESF_UniqueHashCode();
	return mESF_SpriteAtlas_AssetBundleAttributeMaping.ContainsKey(key) ? mESF_SpriteAtlas_AssetBundleAttributeMaping[key] : null;
	}
}